from math import *


def angle2R(beta1, beta2, r1, r2):
    Rc = (r2 ** 2 - r1 ** 2) / 2 / (r2 * sin(beta2) - r1 * sin(beta1))  # 圆弧半径
    Rc = abs(Rc)
    R0 = sqrt(Rc ** 2 + r2 ** 2 - 2 * Rc * r2 * sin(beta2))
    return Rc, R0
